package com.woyou.model.rpc;

import java.util.List;

import retrofit.RetrofitError;
import retrofit.http.Field;
import retrofit.http.FormUrlEncoded;
import retrofit.http.POST;

import com.woyou.bean.ActivityType;
import com.woyou.bean.CodeListResult;
import com.woyou.bean.CodeResult;
import com.woyou.bean.Comments;
import com.woyou.bean.Gift;
import com.woyou.bean.Goods;
import com.woyou.bean.Ladder;
import com.woyou.bean.Result;
import com.woyou.bean.ShopDetail;
import com.woyou.bean.ShopItem;
import com.woyou.bean.ShopType;

/**
 * 获取商户相关信息的Retrofit Service
 * 
 * @author longtao.li
 */
@SuppressWarnings("rawtypes")
public interface ShopService {
	
	/**
	 * 查询店铺列表
	 * @param params
	 * @param isEncrypted
	 * @param timeStamp
	 * @param randomNum
	 * @param sign
	 * @return
	 * @throws RetrofitError
	 */
	@FormUrlEncoded
	@POST("/v2_3queryShopList")
	CodeListResult<ShopItem> v2_3queryShopList(
			@Field("params") String params, 
			@Field("isEncrypted")String isEncrypted, 
			@Field("timeStamp") String timeStamp, 
			@Field("randomNum")String randomNum,
			@Field("sign")String sign)throws RetrofitError;
	
	/**
	 * 2.8	获取店铺详情（http://xxxx/ v2_3queryShopInfo）
	 * @param params
	 * @param isEncrypted
	 * @param timeStamp
	 * @param randomNum
	 * @param sign
	 * @return
	 * @throws RetrofitError
	 */
	@FormUrlEncoded
	@POST("/v2_3queryShopInfo")
	Result<ShopDetail> v2_3queryShopInfo(
			@Field("params") String params, 
			@Field("isEncrypted")String isEncrypted, 
			@Field("timeStamp") String timeStamp, 
			@Field("randomNum")String randomNum,
			@Field("sign")String sign)throws RetrofitError; 
	
	/**
	 * 2.1	获取商品列表（http://xxxx/v2_2queryGoodsList）
	 * 获取店铺商品列表
	 * @param params
	 * @param isEncrypted
	 * @param timeStamp
	 * @param randomNum
	 * @param sign
	 * @return
	 * @throws RetrofitError
	 */
	@FormUrlEncoded
	@POST("/v2_2queryGoodsList")
	Result<List<Goods>> v2_2queryGoodsList(
			@Field("params") String params, 
			@Field("isEncrypted")String isEncrypted, 
			@Field("timeStamp") String timeStamp, 
			@Field("randomNum")String randomNum,
			@Field("sign")String sign)throws RetrofitError;
	
	/**
	 * 2.10	查询评论列表（http://xxxx/ v2_1queryComments）
	 * @param params
	 * @param isEncrypted
	 * @param timeStamp
	 * @param randomNum
	 * @param sign
	 * @return
	 * @throws RetrofitError
	 */
	@FormUrlEncoded
	@POST("/v2_1queryComments")
	Result<Comments> v2_1queryComments(
			@Field("params") String params, 
			@Field("isEncrypted")String isEncrypted, 
			@Field("timeStamp") String timeStamp, 
			@Field("randomNum")String randomNum,
			@Field("sign")String sign) throws RetrofitError;

	/**
	 * 2.14	获取店铺类型（http://xxxx/queryShopType）
	 * @param params
	 * @param isEncrypted
	 * @param timeStamp
	 * @param randomNum
	 * @param sign
	 * @return
	 * @throws RetrofitError
	 */
	@FormUrlEncoded
	@POST("/queryShopType")
	CodeListResult<ShopType> queryShopType(
			@Field("params") String params, 
			@Field("isEncrypted")String isEncrypted, 
			@Field("timeStamp") String timeStamp, 
			@Field("randomNum")String randomNum,
			@Field("sign")String sign)throws RetrofitError;
	
	/**
	 * 2.20	收藏/取消收藏店铺（http://xxxx/shopCollect）
	 * @param params
	 * @param isEncrypted
	 * @param timeStamp
	 * @param randomNum
	 * @param sign
	 * @return
	 * @throws RetrofitError
	 */
	@FormUrlEncoded
	@POST("/shopCollect")
	CodeResult shopCollect(
			@Field("params") String params, 
			@Field("isEncrypted")String isEncrypted, 
			@Field("timeStamp") String timeStamp, 
			@Field("randomNum")String randomNum,
			@Field("sign")String sign)throws RetrofitError;
	
	/**
	 * 2.21	获取优惠活动
	 * @param params
	 * @param isEncrypted
	 * @param timeStamp
	 * @param randomNum
	 * @param sign
	 * @return
	 * @throws RetrofitError
	 */
	@FormUrlEncoded
	@POST("/queryActivity")
	CodeListResult<Gift> queryActivity(
			@Field("params") String params, 
			@Field("isEncrypted")String isEncrypted, 
			@Field("timeStamp") String timeStamp, 
			@Field("randomNum")String randomNum,
			@Field("sign")String sign)throws RetrofitError;
	
	/**
	 * 2.26	获取平台活动列表（http://xxxx/queryActTypeList）
	 * @param params
	 * @param isEncrypted
	 * @param timeStamp
	 * @param randomNum
	 * @param sign
	 * @return
	 * @throws RetrofitError
	 */
	@FormUrlEncoded
	@POST("/queryActTypeList")
	CodeListResult<ActivityType> queryActTypeList(
			@Field("params") String params, 
			@Field("isEncrypted")String isEncrypted, 
			@Field("timeStamp") String timeStamp, 
			@Field("randomNum")String randomNum,
			@Field("sign")String sign)throws RetrofitError;
	/**
	 * 2.2	查询店铺配送范围（http://xxxx/ v2_1query Radius）
	 * @param params
	 * @param isEncrypted
	 * @param timeStamp
	 * @param randomNum
	 * @param sign
	 * @return
	 * @throws RetrofitError
	 */
	@FormUrlEncoded
	@POST("/v2_1queryRadius")
	Result<List<Ladder>> v2_1queryRadius(
			@Field("params") String params, 
			@Field("isEncrypted")String isEncrypted, 
			@Field("timeStamp") String timeStamp, 
			@Field("randomNum")String randomNum,
			@Field("sign")String sign)throws RetrofitError;

}
